import React from 'react';
import Child from './Child';
import {ResumeContext} from './MyContext'
class Child1 extends React.Component {
  constructor(props) {
    super(props);
  }
  ref = React.createRef()
  state = {
    name: 'zhaoliu'
  }
  render() {
    return (
      <div>
        <ResumeContext.Consumer>
          {({name}) => (
            <h1>child1:{name}</h1>
          )
}
        </ResumeContext.Consumer>
        <Child ref={this.ref}></Child>
      </div>
    );
  }
}

export default Child1;